// components/usershow/usershow.js
const db = wx.cloud.database();
Component({
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {

  },
  lifetimes:{
    created(){
      db.collection('NEXUSET').count().then(res=>{
        console.log(res)
        this.setData({
          userTotal:res.total
        })
      })
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    userTotal:0,
    newUsers:[
      {
        avatarUrl:'../../images/File/pdf.png'
      },
      {
        avatarUrl:'../../images/File/docx.png'
      },
      
      {
        avatarUrl:'../../images/File/ppt.png'
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    tonexu(e){
      this.triggerEvent('navpage', '')
    }
  }
})
